package com.yx.feign.consume.controller;

import com.yx.feign.consume.client.TestFeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/test")
public class TestController {
    @Resource
    private TestFeignClient testFeignClient;
    @RequestMapping("/hello")
    public String consume(String name){
        System.out.println("to consumer: " + name);
        String produce = testFeignClient.produce(name);
        return "From Produce : " + produce;
    }
}
